from django import forms


class ActivateForm(forms.Form):
    """
    证书激活表单
    """
    machine_code = forms.CharField(max_length=255, required=True, error_messages={
        'required': "请填写机器码"
    }, help_text="机器码")
    serial_code = forms.CharField(max_length=255, help_text="序列号", required=True, error_messages={
        'required': '请填写序列号'
    })


class GenerateTsForm(forms.Form):
    """
    ts文件生成表单
    """
    machine_code = forms.CharField(max_length=255, required=True, error_messages={
        "required": "请填写机器码"
    }, help_text="机器码")


class DownloadTsForm(forms.Form):
    """
    ts文件下载表单
    """
    machine_code = forms.CharField(max_length=255, required=True, error_messages={
        "required": "请填写机器码"
    }, help_text="机器码")


class TsStatusForm(forms.Form):
    """
    ts文件状态查询表单
    """
    machine_code = forms.CharField(max_length=255, required=True, error_messages={
        "required": "请填写机器码"
    }, help_text="机器码")


class CertRefreshForm(forms.Form):
    """
    证书刷新表单
    """
    machine_code = forms.CharField(required=True, max_length=255, error_messages={
        "required": "请填写机器码"
    }, help_text="机器码")

